package com.atguigu.tingshu.search.api;

import com.atguigu.tingshu.common.login.TsLogin;
import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.search.service.ItemService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@Tag(name = "专辑详情管理")
@RestController
@RequestMapping("api/search/albumInfo")
@SuppressWarnings({"all"})
public class itemApiController {

	@Autowired
	private ItemService itemService;

	/**
	 * @author WeakMoon
	 * @date 2025/03/01 16:27:00
	 * 专辑详情
	 * 接口地址：http://localhost/api/search/albumInfo/1429
	 * 请求方式：get
	 */
	@Operation(summary = "专辑详情")
	@GetMapping("/{albumId}")
	public Result getItem(@PathVariable Long albumId){
		//调用服务层方法
		Map<String,Object> map = itemService.getItem(albumId);

		//返回结果数据
		return Result.ok(map);

	}

}

